import type { TableColumn } from '@/components/core/dynamic-table';

export type TableListItem = API.UserListPageResultItem;
export type TableColumnItem = TableColumn<TableListItem>;

export const baseColumns: TableColumn[] = [
  {
    title: '关键字',
    align: 'left',
    dataIndex: 'keyword',
    hideInTable: true,
    formItemProps: {
      labelWidth: 55,
      componentProps: () => {
        return {
          placeholder: '可输入申请单号、申请人姓名搜索',
          disabledLabelWidth: true,
        };
      },
    },
  },
  {
    title: '账单编号',
    align: 'left',
    dataIndex: 'userNum',
    hideInSearch: true,
  },
  {
    title: '时间筛选',
    dataIndex: 'time',
    hideInTable: true,
    formItemProps: {
      component: 'RangePicker',
      componentProps: () => {
        return {
          format: 'YYYY/MM/DD HH:mm:ss',
          valueFormat: 'YYYY/MM/DD HH:mm:ss',
          showTime: true,
        };
      },
    },
  },
  {
    width: 300,

    title: '关联合同',
    align: 'left',
    dataIndex: 'userLogin',
    hideInSearch: true,
  },

  {
    title: '合作方名称',
    align: 'left',
    dataIndex: 'userName',
    hideInSearch: true,
  },
  {
    title: '统一社会信用代码',
    align: 'left',
    dataIndex: 'action',
    hideInSearch: true,
  },
  {
    width: 100,

    title: '应付金额',
    align: 'left',
    dataIndex: 'operationTime',
    hideInSearch: true,
  },
  {
    width: 100,

    title: '实付金额',
    align: 'left',
    dataIndex: 'operationName',
    hideInSearch: true,
  },
  {
    width: 100,
    title: '收款人',
    align: 'left',
    dataIndex: 'operationName2',
    hideInSearch: true,
  },
  {
    title: '创建时间',
    align: 'left',
    dataIndex: 'operationName3',
    hideInSearch: true,
  },
];
